package com.light.sys.controller;

import com.light.common.base.BaseController;
import com.light.common.base.PageResult;
import com.light.common.base.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.light.sys.domain.SysConfigDO;
import com.light.sys.service.SysConfigService;
import com.light.sys.query.SysConfigQuery;


/**
 * @author yhr
 * @Description: key
 * @Version V1.0
 * @date
 */

@RestController
@RequestMapping("/sys/sysConfig")
@Api(tags = "参数管理", description = "")
public class SysConfigController extends BaseController<SysConfigDO, SysConfigService> {
    @Autowired
    private SysConfigService sysConfigService;

    @ApiOperation(value = "获取列表信息")
    @GetMapping("")
    public ResponseResult<PageResult<SysConfigDO>> data(SysConfigQuery sysConfigQuery) {
        //查询列表数据
        PageResult pageResult = new PageResult(sysConfigService.data(sysConfigQuery)
                , sysConfigService.count(sysConfigQuery), sysConfigQuery);
        return ResponseResult.success(pageResult);
    }

}
